package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProjectInformationMapper;
import com.ruoyi.system.domain.ProjectInformation;
import com.ruoyi.system.service.IProjectInformationService;

/**
 * 项目信息Service业务层处理
 * 
 * @author zhangjinlei
 * @date 2022-04-25
 */
@Service
public class ProjectInformationServiceImpl implements IProjectInformationService 
{
    @Autowired
    private ProjectInformationMapper projectInformationMapper;

    /**
     * 查询项目信息
     * 
     * @param id 项目信息主键
     * @return 项目信息
     */
    @Override
    public ProjectInformation selectProjectInformationById(Long id)
    {
        return projectInformationMapper.selectProjectInformationById(id);
    }

    /**
     * 查询项目信息列表
     * 
     * @param projectInformation 项目信息
     * @return 项目信息
     */
    @Override
    public List<ProjectInformation> selectProjectInformationList(ProjectInformation projectInformation)
    {
        return projectInformationMapper.selectProjectInformationList(projectInformation);
    }

    /**
     * 新增项目信息
     * 
     * @param projectInformation 项目信息
     * @return 结果
     */
    @Override
    public int insertProjectInformation(ProjectInformation projectInformation)
    {
        projectInformation.setCreateTime(DateUtils.getNowDate());
        return projectInformationMapper.insertProjectInformation(projectInformation);
    }

    /**
     * 修改项目信息
     * 
     * @param projectInformation 项目信息
     * @return 结果
     */
    @Override
    public int updateProjectInformation(ProjectInformation projectInformation)
    {
        projectInformation.setUpdateTime(DateUtils.getNowDate());
        return projectInformationMapper.updateProjectInformation(projectInformation);
    }

    /**
     * 批量删除项目信息
     * 
     * @param ids 需要删除的项目信息主键
     * @return 结果
     */
    @Override
    public int deleteProjectInformationByIds(Long[] ids)
    {
        return projectInformationMapper.deleteProjectInformationByIds(ids);
    }

    /**
     * 删除项目信息信息
     * 
     * @param id 项目信息主键
     * @return 结果
     */
    @Override
    public int deleteProjectInformationById(Long id)
    {
        return projectInformationMapper.deleteProjectInformationById(id);
    }
}
